import org.kwis.msp.lcdui.Jlet;
import org.kwis.msp.lcdui.Display;

import org.kwis.msp.lwc.CheckboxComponent;
import org.kwis.msp.lwc.CheckboxGroup;
import org.kwis.msp.lwc.ShellComponent;
import org.kwis.msp.lwc.FormComponent;
import org.kwis.msp.lwc.LabelComponent;

public class CheckboxComponentEx1 extends Jlet{

	Display displayLCD ;
	ShellComponent shell;
		

	public CheckboxComponentEx1(){      }

	protected void startApp(String[] arg0){
		
		displayLCD = Display.getDefaultDisplay();
		shell = new ShellComponent();

		FormComponent form = new FormComponent();

		CheckboxGroup ckbGroup = new CheckboxGroup();

		CheckboxComponent ckb1 = new CheckboxComponent("국어",null,ckbGroup);
		CheckboxComponent ckb2 = new CheckboxComponent("영어",null,ckbGroup);
		CheckboxComponent ckb3 = new CheckboxComponent("수학",null,ckbGroup);
		CheckboxComponent exCKB1 = new CheckboxComponent("사회",null,true);
		CheckboxComponent exCKB2 = new CheckboxComponent("물리",null,false);
		CheckboxComponent exCKB3 = new CheckboxComponent("화학",null,false);

		ckbGroup.select(ckb2);

		exCKB3.setState(true);


		form.addComponent(ckb1);
		form.addComponent(ckb2);
		form.addComponent(ckb3);

		form.addComponent(exCKB1);
		form.addComponent(exCKB2);
		form.addComponent(exCKB3);

		LabelComponent label = new LabelComponent(" CheckboxComponent");

		shell.setWorkComponent(form);
		shell.setTitle(label);

		displayLCD.pushCard(shell.getCard());

	}
	protected void destroyApp(boolean arg0) {  }

	

}
